import unittest
from time import sleep
from appium import webdriver

class BaseCase(unittest.TestCase):
    def setUp(self) -> None:
        desired_capabilities = {
            'platformName': 'Android',
            'platformVersion': '7.1.2',
            'deviceName': '127.0.0.1:62001',
            'appPackage': 'com.gfeng.daydaycook',
            'appActivity': 'com.gfeng.daydaycook.activity.WelcomeActivity',
            'noReset': True,
            'newCommandTimeout': 60,
            'unicodeKeyboard': True,
            'resetKeyboard': True
        }
        self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_capabilities)
        self.driver.implicitly_wait(30)




    def tearDown(self) -> None:
        sleep(5)
        self.driver.quit()